package cn;

import org.apache.catalina.User;
import org.apache.shiro.SecurityUtils;
import org.apache.shiro.authc.AuthenticationInfo;
import org.apache.shiro.authc.AuthenticationToken;
import org.apache.shiro.authc.UsernamePasswordToken;
import org.apache.shiro.crypto.hash.Md5Hash;
import org.apache.shiro.crypto.hash.Sha1Hash;
import org.apache.shiro.crypto.hash.Sha256Hash;
import org.apache.shiro.crypto.hash.Sha512Hash;
import org.apache.shiro.subject.Subject;

import cn.dliyy.warehouse.bean.BUnit;
import cn.dliyy.warehouse.dao.EntityDaoImpl;

public class Test {

	/**
	 * @param args
	 */
	public static void main(String[] args) {

		
		BUnit bunit = new BUnit();
		System.out.println(BUnit.class.getSimpleName());
		System.out.println(bunit.getClass().getSimpleName());
		Object o= bunit;
		System.out.println(o.getClass().getSimpleName());
		
		
		EntityDaoImpl dao = new EntityDaoImpl();
	
	}
	 
	protected AuthenticationInfo doGetAuthenticationInfo(AuthenticationToken authcToken){
		UsernamePasswordToken token=(UsernamePasswordToken) authcToken;
		AuthenticationToken atoken;
		Subject cuser;
		SecurityUtils su;
		User user;
		
		return null;
		
	}
	private void t(){
		int i = 0xf;
		int k =0x7;
		System.out.println(i&k);
		System.out.println(i^k);
		System.out.println(i|k);
		char[] c= "ttt我们".toCharArray();
		System.out.println(c.length+";"+Character.SIZE);
		String a="";
		
		String encodedPassword1 = new Sha1Hash("1第三").toBase64();
		String encodedPassword3 = new Md5Hash("1第三").toString();
		String encodedPassword4 = new Md5Hash("1第三").toHex();
		String encodedPassword5 = new Md5Hash("1第三").toBase64();
		String encodedPassword2 = new Sha256Hash("q").toBase64();
		System.out.println(encodedPassword1+":"+encodedPassword1.length());
		System.out.println(encodedPassword2+":"+encodedPassword2.length());
		System.out.println(encodedPassword3+":"+encodedPassword3.length());
		System.out.println(encodedPassword4+":"+encodedPassword4.length());
		System.out.println(encodedPassword5+":"+encodedPassword5.length());
	}
	
	
	

}
